﻿using Aliyun.OSS;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.Common.OSS
{
    /// <summary>
    /// 存储对象
    /// </summary>
    public interface IOSSObject
    {
        /// <summary>
        /// 获取存储空间下所有存储对象列表
        /// </summary>
        /// <param name="bucketName">存储空间名称</param>
        /// <returns></returns>
        ObjectListing ListObjects(string bucketName);
        /// <summary>
        /// 上传回调
        /// </summary>
        /// <param name="bucketName">存储空间名称</param>
        /// <param name="objectName">存储对象名称</param>
        /// <param name="localFileName">本地文件名称</param>
        /// <param name="uploadFileRecordNo">上传文件记录编号</param>
        /// <param name="fileExists">文件是否存在</param>
        /// <returns></returns>
        bool PutObjectCallback(string bucketName,string objectName,string localFileName, string uploadFileRecordNo, out bool fileExists);
        /// <summary>
        /// 检查对象是否存在
        /// </summary>
        /// <param name="bucketName">存储空间名称</param>
        /// <param name="objectName">存储对象名称</param>
        /// <returns></returns>
        bool DoesObjectExist(string bucketName, string objectName);
    }
}
